The invention relates to patterning of a layer of solid electrolyte, in particular to produce a lithium microbattery.